﻿<!DOCTYPE html>
<%@ include file="/common/taglibs.jsp"%>
<html lang="en">
<head>
<meta http-equiv="Cache-Control" content="no-store"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="<c:url value="/images/favicon.ico"/>"/>
<title>
<decorator:title/>
|
<fmt:message key="webapp.name"/>
</title>
<%--Bootstrap是Twitter推出的一个开源的用于前端开发的工具包。它由Twitter的设计师Mark Otto和Jacob Thornton合作开发，是一个CSS/HTML框架。--%>
<%--Bootstrap中包含了丰富的Web组件，根据这些组件，可以快速的搭建一个漂亮、功能完备的网站。其中包括以下组件：
    下拉菜单、按钮组、按钮下拉菜单、导航、导航条、面包屑、分页、排版、缩略图、警告对话框、进度条、媒体对象等--%>
<%--现在很流行一个词叫 “响应式” (Responsive)简而言之，就是一个网站能够兼容多个终端——而不是为每个终端做一个特定的版本。并且用了  bootstrap-responsive 的话移动设备行会好些。--%>
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/lib/bootstrap-2.2.1.min.css'/>" />
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/lib/bootstrap-responsive-2.2.1.min.css'/>" />
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/style.css'/>" />
<decorator:head/>
<script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/bootstrap-2.2.1.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/plugins/jquery.cookie.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/script.js'/>"></script>
</head>

<%-- 
<decorator:getProperty property="..." [ default="..." ] [ writeEntireProperty="..." ]/>
在标签处插入原始页面(被包装页面)的原有的标签的属性中的内容，还可以添加一个缺省值。
writeEntireProperty="true"会在插入内容前加入一个空格。
 --%>
 
<body
<decorator:getProperty property="body.id" writeEntireProperty="true"/>
<decorator:getProperty property="body.class" writeEntireProperty="true"/>
>


<%-- 设置currentMenu变量 --%>
<c:set var="currentMenu" scope="request">
  <decorator:getProperty property="meta.menu"/>
</c:set>

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container-fluid">
      <%-- For smartphones  and smaller screens --%>
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
      <a class="brand" href="<c:url value='/'/>">
      <fmt:message key="webapp.name"/>
      </a>
      <%@ include file="/common/menu.jsp" %>
      <c:if test="${pageContext.request.locale.language ne 'en'}">
        <div id="switchLocale"><a href="<c:url value='/?locale=en'/>">
          <fmt:message key="webapp.name"/>
          in English</a> </div>
      </c:if>
    </div>
  </div>
</div>

<div class="container-fluid">
  <%@ include file="/common/messages.jsp" %>
  <div class="row-fluid">
    <decorator:body/>
    <c:if test="${currentMenu == 'AdminMenu'}">
      <div class="span2">
        <menu:useMenuDisplayer name="Velocity" config="navlistMenu.vm" permissions="rolesAdapter">
          <menu:displayMenu name="AdminMenu"/>
        </menu:useMenuDisplayer>
      </div>
    </c:if>
  </div>
</div>

<div id="footer"> <span class="left">
  <fmt:message key="webapp.version"/>
  <c:if test="${pageContext.request.remoteUser != null}"> |
    <fmt:message key="user.status"/>
    ${pageContext.request.remoteUser} </c:if>
  </span> <span class="right"> &copy;
  <fmt:message key="copyright.year"/>
  <a href="<fmt:message key="company.url"/>">
  <fmt:message key="company.name"/>
  </a> </span> </div>
<%= (request.getAttribute("scripts") != null) ?  request.getAttribute("scripts") : "" %>
</body></html>
